change sprite of gameobject unity

83

unity object change sprite -

public SpriteRenderer spriteRenderer;
public Sprite newSprite;

void ChangeSprite()
    {
        spriteRenderer.sprite = newSprite; 
    }Copied!

Comments

Submit
0 Comments